<?php


namespace app\open\controller;
/**
 * Class File
 * @package app\admin\controller
 * @property \app\common\logic\File logicCFile
 */

class File  extends ControllerBase
{
    /**
     * @OA\Post(
     *   tags={"文件"},
     *   path="/File/pictureUpload",
     *   summary="本地图片上传",
     *   @OA\RequestBody(
     *         required=true,
     *         @OA\MediaType(
     *             mediaType="multipart/form-data",
     *             @OA\Schema(
     *                 @OA\Property(
     *                     description="需要上传的文件",
     *                     property="file",
     *                     type="file",
     *                     format="file",
     *                 ),
     *                 required={"file"}
     *             )
     *         )
     *     ),
     *   @OA\Response(
     *     @OA\MediaType( mediaType="application/json"),
     *     response=200,
     *     description="返回图片"
     *   )
     * )
     */
    public function pictureUpload()
    {
        $result = $this->logicFile->pictureUpload();
        return result()->data($result)->toJson();
    }

}
